300 |
How do I change the cell's background color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"C1"); spGrid1->GetColumns()->Add(L"C2"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellValue(h,long(1),"Cell 2"); var_Items->PutCellBackColor(h,long(1),RGB(255,0,0)); |
299 |
How do I change the caption or value for a particular cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"C1"); spGrid1->GetColumns()->Add(L"C2"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Cell 1"),long(1),"Cell 2"); |
298 |
How do I get the handle of the cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutCellBold(vtMissing,var_Items->GetItemCell(h,long(0)),VARIANT_TRUE); |
297 |
How do I retrieve the focused item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetFocusItem(),VARIANT_TRUE); |
296 |
How do I get the number or count of child items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->AddItem(var_Items->GetChildCount(h)); |
295 |
How do I enumerate the visible items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->PutItemBold(var_Items->GetFirstVisibleItem(),VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetNextVisibleItem(var_Items->GetFirstVisibleItem()),VARIANT_TRUE); |
294 |
How do I enumerate the siblings items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->PutItemBold(var_Items->GetNextSiblingItem(var_Items->GetFirstVisibleItem()),VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetPrevSiblingItem(var_Items->GetNextSiblingItem(var_Items->GetFirstVisibleItem())),VARIANT_TRUE); |
293 |
How do I get the parent item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetItemParent(var_Items->GetItemChild(h)),VARIANT_TRUE); |
292 |
How do I get the first child item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetItemChild(h),VARIANT_TRUE); |
291 |
How do I enumerate the root items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutItemBold(var_Items->GetRootItem(0),VARIANT_TRUE); var_Items->PutItemUnderline(var_Items->GetRootItem(1),VARIANT_TRUE); |
290 |
I have a hierarchy, how can I count the number of root items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->AddItem(var_Items->GetRootCount()); |
289 |
How can I make an item unselectable, or not selectable
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Column"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("unselectable - you can't get selected"); var_Items->PutSelectableItem(h,VARIANT_FALSE); var_Items->AddItem("selectable"); |
288 |
How can I hide or show an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Column"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("hidden"); var_Items->PutItemHeight(h,0); var_Items->PutSelectableItem(h,VARIANT_FALSE); var_Items->AddItem("visible"); |
287 |
How can I change the height for all items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->PutDefaultItemHeight(32); spGrid1->GetColumns()->Add(L"Column"); spGrid1->GetItems()->AddItem("One"); spGrid1->GetItems()->AddItem("Two"); |
286 |
How do I change the height of an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->PutScrollBySingleLine(VARIANT_TRUE); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutItemHeight(var_Items->AddItem("height"),128); spGrid1->GetItems()->AddItem("enabled"); |
285 |
How do I disable or enable an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutEnableItem(var_Items->AddItem("disabled"),VARIANT_FALSE); spGrid1->GetItems()->AddItem("enabled"); |
284 |
How do I display as strikeout a cell
|
283 |
How do I display as strikeout a cell or an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValueFormat(var_Items->AddItem("gets <s>strikeout</s> only a portion of text"),long(0),EXGRIDLib::exHTML); |
282 |
How do I display as strikeout an item
|
281 |
How do I underline a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellUnderline(var_Items->AddItem("underline"),long(0),VARIANT_TRUE); |
280 |
How do I underline a cell or an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValueFormat(var_Items->AddItem("gets <u>underline</u> only a portion of text"),long(0),EXGRIDLib::exHTML); |
279 |
How do I underline an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutItemUnderline(var_Items->AddItem("underline"),VARIANT_TRUE); |
278 |
How do I display as italic a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellItalic(var_Items->AddItem("italic"),long(0),VARIANT_TRUE); |
277 |
How do I display as italic a cell or an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValueFormat(var_Items->AddItem("gets <i>italic</i> only a portion of text"),long(0),EXGRIDLib::exHTML); |
276 |
How do I display as italic an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutItemItalic(var_Items->AddItem("italic"),VARIANT_TRUE); |
275 |
How do I bold a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellBold(var_Items->AddItem("bold"),long(0),VARIANT_TRUE); |
274 |
How do I bold a cell or an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValueFormat(var_Items->AddItem("gets <b>bold</b> only a portion of text"),long(0),EXGRIDLib::exHTML); |
273 |
How do I bold an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutItemBold(var_Items->AddItem("bold"),VARIANT_TRUE); |
272 |
How do I change the foreground color for the item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->PutItemForeColor(hC,RGB(255,0,0)); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
271 |
How do I change the visual appearance for the item, using your EBN technology
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->PutItemBackColor(hC,0x1000000); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
270 |
How do I change the background color for the item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->PutItemBackColor(hC,RGB(255,0,0)); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
269 |
How do I expand or collapse an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
268 |
How do I associate an extra data to an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutItemData(var_Items->AddItem("item"),"your extra data"); |
267 |
How do I get the number or count of items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems(); var_Items1->AddItem(var_Items1->GetItemCount()); |
266 |
How can I specify the width of the ActiveX control, when using the InsertControlItem property
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->PutScrollBySingleLine(VARIANT_FALSE); spGrid1->PutTreeColumnIndex(1); spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines); spGrid1->GetColumns()->Add(L"C1"); spGrid1->GetColumns()->Add(L"C2"); spGrid1->GetColumns()->Add(L"C3"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->InsertControlItem(vtMissing,L"MSCAL.Calendar",vtMissing); var_Items->PutItemWidth(h,128); var_Items->PutCellValue(h,long(0),"This is a bit of text that is shown in the first column"); var_Items->PutCellSingleLine(h,long(0),EXGRIDLib::exCaptionWordWrap); var_Items->PutCellValue(h,long(2),"This is a bit of text that is shown in the third column"); var_Items->PutCellSingleLine(h,long(2),EXGRIDLib::exCaptionWordWrap); |
265 |
How can I put the ActiveX control in a different column, when using the InsertControlItem property
|
264 |
Is there any function I can use to get the program or the control identifier I've been using when called the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); spGrid1->PutScrollBySingleLine(VARIANT_FALSE); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->InsertControlItem(vtMissing,L"MSCAL.Calendar",vtMissing); var_Items->InsertItem(h,vtMissing,var_Items->GetItemControlID(h)); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->InsertControlItem(vtMissing,L"MSChart20Lib.MSChart",vtMissing); var_Items->PutItemAppearance(h,EXGRIDLib::Etched); var_Items->InsertItem(h,vtMissing,var_Items->GetItemControlID(h)); var_Items->PutExpandItem(h,VARIANT_TRUE); |
263 |
How can I change the height of newly created ActiveX control, using the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); spGrid1->PutScrollBySingleLine(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutItemHeight(var_Items->InsertControlItem(vtMissing,L"MSCAL.Calendar",vtMissing),64); var_Items->PutItemAppearance(var_Items->InsertControlItem(vtMissing,L"MSChart20Lib.MSChart",vtMissing),EXGRIDLib::Etched); |
262 |
How can I change the border for newly created ActiveX control, using the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); spGrid1->PutScrollBySingleLine(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutItemAppearance(var_Items->InsertControlItem(vtMissing,L"MSCAL.Calendar",vtMissing),EXGRIDLib::Sunken); var_Items->PutItemAppearance(var_Items->InsertControlItem(vtMissing,L"MSChart20Lib.MSChart",vtMissing),EXGRIDLib::Etched); |
261 |
How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); /* Copy and paste the following directives to your header file as it defines the namespace 'MSACAL' for the library: 'Microsoft Calendar Control 2007' #import <MSCAL.OCX> */ MSACAL::ICalendarPtr var_Calendar = ((MSACAL::ICalendarPtr)(var_Items->GetItemObject(var_Items->InsertControlItem(h,L"MSCAL.Calendar",vtMissing)))); var_Calendar->PutBackColor(RGB(255,255,255)); var_Calendar->PutGridCellEffect(0); var_Calendar->PutShowTitle(VARIANT_FALSE); var_Calendar->PutShowDateSelectors(VARIANT_FALSE); var_Items->PutExpandItem(h,VARIANT_TRUE); |
260 |
How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); /* Copy and paste the following directives to your header file as it defines the namespace 'MSACAL' for the library: 'Microsoft Calendar Control 2007' #import <MSCAL.OCX> */ MSACAL::ICalendarPtr var_Calendar = ((MSACAL::ICalendarPtr)(var_Items->GetItemObject(var_Items->InsertControlItem(h,L"MSCAL.Calendar",vtMissing)))); var_Calendar->PutBackColor(RGB(255,255,255)); var_Items->PutExpandItem(h,VARIANT_TRUE); |
259 |
How can I insert an ActiveX control
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertControlItem(h,L"MSCAL.Calendar",vtMissing); var_Items->PutExpandItem(h,VARIANT_TRUE); |
258 |
How can I change at runtime the parent of the item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long hP = var_Items->AddItem("Root"); long hC = var_Items->AddItem("Child"); var_Items->SetParent(hC,hP); |
257 |
How can I sort the items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spGrid1->GetColumns()->GetItem("Default")->PutSortOrder(EXGRIDLib::SortDescending); |
256 |
How do I sort the child items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->SortChildren(h,long(0),VARIANT_FALSE); |
255 |
How can I ensure or scroll the control so the item fits the control's client area
|
254 |
How can I remove or delete all items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); spGrid1->GetItems()->AddItem("removed item"); spGrid1->GetItems()->RemoveAllItems(); |
253 |
How can I remove or delete an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"Default"); long h = spGrid1->GetItems()->AddItem("removed item"); spGrid1->GetItems()->RemoveItem(h); |
252 |
How can I add or insert child items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->GetColumns()->Add(L"C1"); spGrid1->GetColumns()->Add(L"C2"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellValue(h,long(1),"Cell 2"); var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Cell 3"),long(1),"Cell 4"); var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Cell 5"),long(1),"Cell 6"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
251 |
How can I add or insert a child item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot); spGrid1->GetColumns()->Add(L"Default"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->InsertItem(var_Items->AddItem("root"),vtMissing,"child"); |
250 |
How can I add or insert an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"C1"); spGrid1->GetColumns()->Add(L"C2"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Cell 1"),long(1),"Cell 2"); long h = var_Items->AddItem("Cell 3"); var_Items->PutCellValue(h,long(1),"Cell 4"); |
249 |
How can I add or insert an item
|
248 |
How can I get the columns as they are shown in the control's sortbar
|
247 |
How can I access the properties of a column
|
246 |
How can I remove all the columns
|
245 |
How can I remove a column
|
244 |
How can I get the number or the count of columns
|
243 |
How can I change the font for all cells in the entire column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ stdole::FontPtr f = ::CreateObject(L"StdFont"); f->PutName(L"Tahoma"); f->PutSize(_variant_t(long(12))); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutFont(IFontDispPtr(((stdole::FontPtr)(f)))); var_ConditionalFormat->PutApplyTo(EXGRIDLib::exFormatToColumns); spGrid1->GetColumns()->Add(L"Column"); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
242 |
How can I change the background color for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutBackColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXGRIDLib::exFormatToColumns); spGrid1->GetColumns()->Add(L"Column"); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
241 |
How can I change the foreground color for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutForeColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXGRIDLib::exFormatToColumns); spGrid1->GetColumns()->Add(L"Column"); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
240 |
How can I show as strikeout all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutStrikeOut(VARIANT_TRUE); var_ConditionalFormat->PutApplyTo(EXGRIDLib::exFormatToColumns); spGrid1->GetColumns()->Add(L"Column"); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
239 |
How can I underline all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutUnderline(VARIANT_TRUE); var_ConditionalFormat->PutApplyTo(EXGRIDLib::exFormatToColumns); spGrid1->GetColumns()->Add(L"Column"); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
238 |
How can I show in italic all data in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutItalic(VARIANT_TRUE); var_ConditionalFormat->PutApplyTo(EXGRIDLib::exFormatToColumns); spGrid1->GetColumns()->Add(L"Column"); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
237 |
How can I bold the entire column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutBold(VARIANT_TRUE); var_ConditionalFormat->PutApplyTo(EXGRIDLib::exFormatToColumns); spGrid1->GetColumns()->Add(L"Column"); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
236 |
How can I display a computed column and highlight some values that are negative or less than a value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"A"); spGrid1->GetColumns()->Add(L"B"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"(A+B)*1.19")))->PutComputedField(L"(dbl(%0) + dbl(%1)) * 1.19"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(2)); EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems(); var_Items1->PutCellValue(var_Items1->AddItem(long(10)),long(1),long(20)); EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"dbl(%2) > 10",vtMissing); var_ConditionalFormat->PutBold(VARIANT_TRUE); var_ConditionalFormat->PutForeColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x2)); |
235 |
Can I display a computed column so it displays the VAT, or SUM
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"A"); spGrid1->GetColumns()->Add(L"B"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"(A+B)*1.19")))->PutComputedField(L"(dbl(%0) + dbl(%1)) * 1.19"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(2)); EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems(); var_Items1->PutCellValue(var_Items1->AddItem(long(10)),long(1),long(20)); |
234 |
How can I show a column that adds values in the cells
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"A"); spGrid1->GetColumns()->Add(L"B"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"A+B")))->PutComputedField(L"dbl(%0) + dbl(%1)"); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(2)); EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems(); var_Items1->PutCellValue(var_Items1->AddItem(long(10)),long(1),long(20)); |
233 |
Is there any function to filter the control's data as I type, so the items being displayed include the typed characters
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Filter"))); var_Column->PutFilterOnType(VARIANT_TRUE); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutAutoSearch(EXGRIDLib::exContains); spGrid1->GetItems()->AddItem("Canada"); spGrid1->GetItems()->AddItem("USA"); |
232 |
Is there any function to filter the control's data as I type, something like filter on type
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Filter"))); var_Column->PutFilterOnType(VARIANT_TRUE); var_Column->PutDisplayFilterButton(VARIANT_TRUE); spGrid1->GetItems()->AddItem("Canada"); spGrid1->GetItems()->AddItem("USA"); |
231 |
How can I programmatically filter a column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Filter"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXGRIDLib::exNonBlanks); spGrid1->GetItems()->AddItem(vtMissing); spGrid1->GetItems()->AddItem("not empty"); spGrid1->ApplyFilter(); |
230 |
How can I show or display the control's filter
|
229 |
How can I customize the items being displayed in the drop down filter window
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Custom Filter"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterPattern(VARIANT_FALSE); var_Column->PutCustomFilter(_bstr_t("Excel Spreadsheets (*.xls )||*.xls|||Word Documents||*.doc|||Powerpoint Presentations||*.pps|||Text Documents (*.log,*.txt)||*.") + "txt|*.log"); var_Column->PutFilterType(EXGRIDLib::exPattern); var_Column->PutFilter(L"*.xls"); spGrid1->GetItems()->AddItem("excel.xls"); spGrid1->GetItems()->AddItem("word.doc"); spGrid1->GetItems()->AddItem("pp.pps"); spGrid1->GetItems()->AddItem("text.txt"); spGrid1->ApplyFilter(); |
228 |
How can I change the order or the position of the columns in the sort bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->PutSortBarVisible(VARIANT_TRUE); spGrid1->PutSortBarColumnWidth(48); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"C1")))->PutSortOrder(EXGRIDLib::SortAscending); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"C2")))->PutSortOrder(EXGRIDLib::SortDescending); spGrid1->GetColumns()->GetItem("C2")->PutSortPosition(0); |
227 |
How do I arrange my columns on multiple levels
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"S")))->PutWidth(32); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Level 2")))->PutLevelKey(long(1)); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Level 3")))->PutLevelKey(long(1)); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Level 4")))->PutLevelKey(long(1)); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Level 1")))->PutLevelKey("2"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Level 2")))->PutLevelKey("2"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Level 3")))->PutLevelKey("2"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Level 4")))->PutLevelKey("2"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"E")))->PutWidth(32); |
226 |
How do I arrange my columns on multiple lines
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->PutHeaderHeight(32); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"")))->PutHTMLCaption(L"Line 1<br>Line 2"); |
225 |
How can I display all cells using HTML format
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"HTML")))->PutDef(EXGRIDLib::exCellValueFormat,long(1)); spGrid1->GetItems()->AddItem("<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>."); |
224 |
How can I display all cells using multiple lines
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"MultipleLine")))->PutDef(EXGRIDLib::exCellSingleLine,VARIANT_FALSE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"SingleLine")))->PutDef(EXGRIDLib::exCellSingleLine,VARIANT_TRUE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("This is a bit of long text that should break the line"),long(1),"this is a bit of long text that's displayed on a single line"); |
223 |
How do change the vertical alignment for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"MultipleLine")))->PutDef(EXGRIDLib::exCellSingleLine,VARIANT_FALSE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"VAlign")))->PutDef(EXGRIDLib::exCellVAlignment,long(2)); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("This is a bit of long text that should break the line"),long(1),"bottom"); EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems(); var_Items1->PutCellValue(var_Items1->AddItem("This is a bit of long text that should break the line"),long(1),"bottom"); |
222 |
How do change the foreground color for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"ForeColor")))->PutDef(EXGRIDLib::exCellForeColor,long(255)); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
221 |
How do change the background color for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"BackColor")))->PutDef(EXGRIDLib::exCellBackColor,long(255)); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
220 |
How do I show buttons for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Button"))); var_Column->PutDef(EXGRIDLib::exCellHasButton,VARIANT_TRUE); var_Column->PutDef(EXGRIDLib::exCellButtonAutoWidth,VARIANT_TRUE); spGrid1->GetItems()->AddItem(" Button 1 "); spGrid1->GetItems()->AddItem(" Button 2 "); |
219 |
How do I show buttons for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Button")))->PutDef(EXGRIDLib::exCellHasButton,VARIANT_TRUE); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
218 |
How do I display radio buttons for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Radio")))->PutDef(EXGRIDLib::exCellHasRadioButton,VARIANT_TRUE); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
217 |
How do I display checkboxes for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check")))->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
216 |
How can I display a tooltip when the cursor hovers the column
|
215 |
Is there any function to assign a key to a column instead using its name or capion
|
214 |
Is there any function to assign any extra data to a column
|
213 |
By default, the column gets sorted descending, when I first click its header. How can I change so the column gets sorted ascending when the user first clicks the column's header
|
212 |
How can I specify the maximum width for the column, if I use WidthAutoResize property
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Auto"))); var_Column->PutWidthAutoResize(VARIANT_TRUE); var_Column->PutMinWidthAutoResize(32); var_Column->PutMaxWidthAutoResize(128); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
211 |
How can I specify the minimum width for the column, if I use WidthAutoResize property
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Auto"))); var_Column->PutWidthAutoResize(VARIANT_TRUE); var_Column->PutMinWidthAutoResize(32); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
210 |
Is there any option to resize the column based on its data, captions
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"A")))->PutWidthAutoResize(VARIANT_TRUE); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
209 |
How can I align the icon in the column's header in the center
|
208 |
How do I align the icon in the column's header to the right
|
207 |
How do I show or hide the sorting icons, but still need sorting
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Sorted")))->PutSortOrder(EXGRIDLib::SortAscending); spGrid1->GetColumns()->GetItem(long(0))->PutDisplaySortIcon(VARIANT_FALSE); |
206 |
How do I enable or disable the entire column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); spGrid1->GetColumns()->Add(L"C1"); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Disabled")))->PutEnabled(VARIANT_FALSE); EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(0)),long(1),"0.1"); EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems(); var_Items1->PutCellValue(var_Items1->AddItem(long(1)),long(1),"1.1"); |
205 |
How do I disable drag and drop columns
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"C1")))->PutAllowDragging(VARIANT_FALSE); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"C2")))->PutAllowDragging(VARIANT_FALSE); |
204 |
How do I disable resizing a column at runtime
|
203 |
How can I align the column to the right, and its caption too
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Column"))); var_Column->PutAlignment(EXGRIDLib::RightAlignment); var_Column->PutHeaderAlignment(EXGRIDLib::RightAlignment); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
202 |
How can I align the column to the right
/* Copy and paste the following directives to your header file as it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library' #import <ExGrid.dll> using namespace EXGRIDLib; */ EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown(); ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Column")))->PutAlignment(EXGRIDLib::RightAlignment); spGrid1->GetItems()->AddItem(long(0)); spGrid1->GetItems()->AddItem(long(1)); |
201 |
How do I change the column's caption
|